Ext.define('SA.model.Question', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'surveyId', type: 'int'},
        {name: 'questionId', type: 'int'},
        {name: 'languageId', type: 'int', defaultValue: 1},
        {name: 'questionTypeId', type: 'int'},
        'questionText',
        {name: 'weight', type: 'float'},
        {name: 'compositeId', type: 'string', 
        	convert: function(value, record) {
        		return record.get('surveyId') + ':' +
        			record.get('questionId') + ':' +
        			record.get('languageId');
        		
        	}
        
        }
     ],
     idProperty: 'compositeId'
});